<template>
  <div>
    <table class="table table-bordered">
      <tbody>
        <tr>
          <td>序号</td>
          <td>名称</td>
          <td>状态</td>
          <td>操作</td>
        </tr>
        <tr v-for="a in info.list" :key="a.sid">
          <td>{{ a.sid }}</td>
          <td>{{ a.sname }}</td>
          <td>
            <span v-if="a.stype == 1">启用</span>
            <span v-if="a.stype == 0">禁用</span>
          </td>
          <td>操作</td>
        </tr>
      </tbody>
    </table>
  </div>
</template>
npm
<script setup lang="ts">
import { reactive, onMounted } from "vue";
import axios from "axios";
let info: any = reactive({
  list: [],
});
onMounted(() => {
  list();
});
const list = () => {
  axios({
    url: "/api/Stores/GetList",
    method: "get",
  }).then((res) => {
    console.log(res);
  });
};
</script>

<style scoped></style>
